﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UA.Framework.Authorization
{
    public class AuthorizeUtility
    {
        private static AuthorizeSettings _settings;

        public static AuthorizeSettings Settings
        {
            get
            {
                if (_settings == null)
                {
                    initializeSettings();
                }
                return _settings;
            }
        }





        private static void initializeSettings()
        {
            _settings = new AuthorizeSettings();
            _settings.IgnoresUrl.Add("/Login");
            _settings.IgnoresUrl.Add("/Login/");
            _settings.IgnoresUrl.Add("/Login/Index");
            _settings.IgnoresUrl.Add("/Login/Index/");

            _settings.LoginUrl = "~/Login/Index";
        }
    }
}
